<!doctype html>
<html lang="">
  <head>
    <meta charset="UTF-8" />
    <link rel="icon" href="/favicon.ico" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Vite App</title>
    <style>
      .box {
        width: 200px;
      }
      .box2 {
        width: 400px;
      }
    </style>
  </head>
  <body>
    <div id="app" @click="message+='s'">
      <!-- 如果给标签属性设置的不是字符串，一定要加v-bind -->
      <img v-bind:src="url" alt="图片" class="box" :class="{box2: isBig}" />
      <div>
        <br />
        <button @click="isBig = !isBig">点我缩放</button>
      </div>
    </div>
    <script src="./vue.js"></script>
    <script>
      new Vue({
        el: '#app',
        data: {
          url: 'https://ts1.cn.mm.bing.net/th?id=ORMS.e1d4fe9751d3fa6d67e8e23f08d66f2f&pid=Wdp&w=612&h=304&qlt=90&c=1&rs=1&dpr=2&p=0',
          isBig: false,
        },
      })
    </script>
  </body>
</html>
